home *** CD-ROM | disk | FTP | other *** search
/ New Masters of Flash / New Masters of Flash.iso / pc / MOVIES / 08_2.dir / 00187_Text_text066.txt < prev   
Text File  |  2000-09-30  |  1KB  |  9 lines

  1. Now that we know where the clip has been dropped, we can then take that information and process it using ifΓǪthen conditional statements to see if itΓÇÖs been dropped on anywhere specific, and act accordingly. For instance, this is the line of code in Psycho Studio which detects that the clip has been dropped on the preview window (itΓÇÖs attached to the buttons in the thumbnails movie that we looked at earlier):
  2.  
  3. if (getProperty( ΓÇ£../../iconΓÇ¥, _droptarget) eq ΓÇ£/preview/screenΓÇ¥) {
  4.    setProperty (ΓÇ£../../iconΓÇ¥, _visible) ΓÇ£0ΓÇ¥);
  5.    loadMovie (eval(ΓÇ£selectionΓÇ¥) add ΓÇ£.swfΓÇ¥, ΓÇ£../../preview/screenΓÇ¥);
  6. }
  7. /preview/screen is the _droptarget returned when the clip is dropped on the preview window. This is because the preview window is made up of two movie clips, one with the instance name preview and another inside that with the instance name screen. So we know if this value is returned from _droptarget, we need to load the relevant clip into the preview window.
  8. And thatΓÇÖs it. I hope this technique will be useful for you when youΓÇÖre designing your own material, and IΓÇÖve included my fla files on the accompanying CD for you to download and experiment with, if youΓÇÖll find that helpful.
  9.